// dilation.fs
//
// maximum of 3x3 kernel

uniform sampler2D videoFrame;


void main(void)
{
    vec4 sample[9];
    vec4 maxValue = vec4(0.0);

    for (int i = 0; i < 9; i++)
    {
        sample[i] = texture2D(videoFrame, gl_TexCoord[0].st);
        maxValue = max(sample[i], maxValue);
    }

    //gl_FragColor = maxValue;
	//gl_FragColor  = gl_Color; //texture2D(videoFrame, gl_TexCoord[0].st);
	gl_FragColor = vec4( gl_TexCoord[0]);
	//gl_FragColor = vec4(1,0,0,1);
}
